mui.init({
	pullRefresh: {
		container: '#pullrefresh',
		down: { //下拉刷新
			callback: pulldownRefresh,
			style: mui.os.android ? "circle" : "default"
		}
	}
});

mui.plusReady(function() {
    //显示跳转链接
	mui('#list_wrap').on('tap','li',function(){
		//var id=this.getAttribute('data-id');
		openNew("unitMain.html");
	})
	
})

//下拉刷新具体业务实现
function pulldownRefresh() {
	loadData();
}

//一次性拉取数据
function loadData() {
	request("/Index/getIndexLis", {
		lon: lon,
		lat: lat
	}, function(json) {
		if (json.code == "0") {

		} else {
			appUI.showTopTip(json.msg)
		}
		appPage.endPullRefresh();
	}, false, function() {
		appPage.endPullRefresh();
		var arr = document.getElementsByClassName("nodata");
		for (var i = 0; i < arr.length; i++) {
			arr[i].innerText = "暂无数据";
		}
	});
}
